package com.itheima.Demo01.demo01;

import java.awt.*;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;

public class JDKDate02 {
    public static void main(String[] args) {
        String S = "2003-06-06  06:06:06";
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd  HH:mm:ss");
        LocalDateTime of = LocalDateTime.parse(S,dtf);
        LocalDateTime now = LocalDateTime.now();

        long between = ChronoUnit.DAYS.between(of, now);
        System.out.println(between);
    }
}
